package com.ruoyi.point.service.impl;

import com.ruoyi.point.mapper.AlarmLogMapper;
import com.ruoyi.point.pojo.AlarmLog;
import com.ruoyi.point.service.IAlarmLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 报警日志记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-22
 */
@Service
public class AlarmLogServiceImpl implements IAlarmLogService
{
    @Autowired
    private AlarmLogMapper alarmLogMapper;

    /**
     * 查询报警日志记录
     *
     * @param alarmLogId 报警日志记录主键
     * @return 报警日志记录
     */
    @Override
    public AlarmLog selectAlarmLogByAlarmLogId(Long alarmLogId)
    {
        return alarmLogMapper.selectAlarmLogByAlarmLogId(alarmLogId);
    }

    /**
     * 查询报警日志记录列表
     *
     * @param alarmLog 报警日志记录
     * @return 报警日志记录
     */
    @Override
    public List<AlarmLog> selectAlarmLogList(AlarmLog alarmLog)
    {
        return alarmLogMapper.selectAlarmLogList(alarmLog);
    }

    /**
     * 新增报警日志记录
     *
     * @param alarmLog 报警日志记录
     * @return 结果
     */
    @Override
    public int insertAlarmLog(AlarmLog alarmLog)
    {
        return alarmLogMapper.insertAlarmLog(alarmLog);
    }

    /**
     * 修改报警日志记录
     *
     * @param alarmLog 报警日志记录
     * @return 结果
     */
    @Override
    public int updateAlarmLog(AlarmLog alarmLog)
    {
        return alarmLogMapper.updateAlarmLog(alarmLog);
    }

    /**
     * 批量删除报警日志记录
     *
     * @param alarmLogIds 需要删除的报警日志记录主键
     * @return 结果
     */
    @Override
    public int deleteAlarmLogByAlarmLogIds(Long[] alarmLogIds)
    {
        return alarmLogMapper.deleteAlarmLogByAlarmLogIds(alarmLogIds);
    }

    /**
     * 删除报警日志记录信息
     *
     * @param alarmLogId 报警日志记录主键
     * @return 结果
     */
    @Override
    public int deleteAlarmLogByAlarmLogId(Long alarmLogId)
    {
        return alarmLogMapper.deleteAlarmLogByAlarmLogId(alarmLogId);
    }
}
